/*
 * Created by SharpDevelop.
 * User: narmi79
 * Date: 7/17/2007
 * Time: 5:03 PM
 */

using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Collections.Generic;

namespace Geotag
{
	/// <summary>
	/// MapCanvas holds collection MapLayer and the operations to be performed on the map.
	/// </summary>
	public partial class MapCanvas : UserControl
	{
		private const int highAlpha = 100;
		private const int lowAlpha = 30;
		private Color baseColor = Color.White;
		private ArrayList canvasColors;
				
		public MapCanvas()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
		}

		void MapCanvasLoad(object sender, EventArgs e)
		{
			panelNorth.BackColor = Color.FromArgb(lowAlpha, baseColor);
			panelSouth.BackColor = Color.FromArgb(lowAlpha, baseColor);
			panelEast.BackColor = Color.FromArgb(lowAlpha, baseColor);
			panelWest.BackColor = Color.FromArgb(lowAlpha, baseColor);
			panelNE.BackColor = Color.FromArgb(lowAlpha, baseColor);
			panelNW.BackColor = Color.FromArgb(lowAlpha, baseColor);
			panelSE.BackColor = Color.FromArgb(lowAlpha, baseColor);
			panelSW.BackColor = Color.FromArgb(lowAlpha, baseColor);
			
			canvasColors = new ArrayList(5);
			canvasColors.Add(Color.FromArgb(255, 181, 221, 245));
			canvasColors.Add(Color.FromArgb(255, 194, 211, 252));
			canvasColors.Add(Color.FromArgb(255, 166, 177, 175));
			canvasColors.Add(Color.FromArgb(255, 142, 180, 203));
			canvasColors.Add(Color.FromArgb(255, 181, 200, 207));
			
			this.BackColor = (Color)canvasColors[0];
		}

		void PanelNorthMouseEnter(object sender, EventArgs e)
		{
			panelNorth.BackColor = Color.FromArgb(highAlpha, baseColor) ;
		}
		
		void PanelNorthMouseLeave(object sender, EventArgs e)
		{
			panelNorth.BackColor = Color.FromArgb(lowAlpha, baseColor);
		}
		
		void PanelSouthMouseEnter(object sender, EventArgs e)
		{
			panelSouth.BackColor = Color.FromArgb(highAlpha, baseColor) ;
		}
		
		void PanelSouthMouseLeave(object sender, EventArgs e)
		{
			panelSouth.BackColor = Color.FromArgb(lowAlpha, baseColor);
		}
		
		void PanelWestMouseEnter(object sender, EventArgs e)
		{
			panelWest.BackColor = Color.FromArgb(highAlpha, baseColor) ;
		}
		
		void PanelWestMouseLeave(object sender, EventArgs e)
		{
			panelWest.BackColor = Color.FromArgb(lowAlpha, baseColor);
		}
		
		void PanelEastMouseEnter(object sender, EventArgs e)
		{
			panelEast.BackColor = Color.FromArgb(highAlpha, baseColor) ;
		}
		
		void PanelEastMouseLeave(object sender, EventArgs e)
		{
			panelEast.BackColor = Color.FromArgb(lowAlpha, baseColor);
		}
		
		void PanelNWMouseEnter(object sender, EventArgs e)
		{
			panelNW.BackColor = Color.FromArgb(highAlpha, baseColor) ;
		}
		
		void PanelNWMouseLeave(object sender, EventArgs e)
		{
			panelNW.BackColor = Color.FromArgb(lowAlpha, baseColor);
		}
		
		void PanelNEMouseEnter(object sender, EventArgs e)
		{
			panelNE.BackColor = Color.FromArgb(highAlpha, baseColor) ;
		}
		
		void PanelNEMouseLeave(object sender, EventArgs e)
		{
			panelNE.BackColor = Color.FromArgb(lowAlpha, baseColor);
		}
		
		void PanelSWMouseEnter(object sender, EventArgs e)
		{
			panelSW.BackColor = Color.FromArgb(highAlpha, baseColor) ;
		}
		
		void PanelSWMouseLeave(object sender, EventArgs e)
		{
			panelSW.BackColor = Color.FromArgb(lowAlpha, baseColor);
		}
		
		void PanelSEMouseEnter(object sender, EventArgs e)
		{
			panelSE.BackColor = Color.FromArgb(highAlpha, baseColor) ;
		}
		
		void PanelSEMouseLeave(object sender, EventArgs e)
		{
			panelSE.BackColor = Color.FromArgb(lowAlpha, baseColor);
		}
		
		void MapCanvasPaint(object sender, PaintEventArgs e)
		{
			// TODO: Implement MapCanvasPaint
			Graphics g = e.Graphics;
		}
	}
}
